package com.ruoyi.walmart.service.order.impl;

import com.ruoyi.walmart.domain.order.OrderCharge;
import com.ruoyi.walmart.mapper.order.OrderChargeMapper;
import com.ruoyi.walmart.service.order.OrderChargeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class OrderChargeServiceImpl implements OrderChargeService {

    @Autowired
    OrderChargeMapper orderChargeMapper;

    @Override
    @Transactional
    public int insertAll(List<OrderCharge> orderChargeList) {
        return orderChargeMapper.insertAll(orderChargeList);
    }

    @Override
    @Transactional
    public int deleteCharge(List<String> customerOrderIds) {
        return orderChargeMapper.deleteCharge(customerOrderIds);
    }
    /** 查询是否存在对应的walmarCharges */
    @Override
    public List<String> findExistingChatgesPurchaseOrderIds(List<String> purchaseOrderIds) {
        return orderChargeMapper.findExistingChatgesPurchaseOrderIds(purchaseOrderIds);
    }
}
